<?
session_start();
include"cek.php";
?>
<HTML>
<HEAD>
<meta http-equiv="Content-Language" content="en-us">
<TITLE>Website Cuti Online</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<style>
<!--
body         { font-family: arial; color: #000080 }
-->
</style>
<script language="JavaScript">
<!--
function FP_preloadImgs() {//v1.0
 var d=document,a=arguments; if(!d.FP_imgs) d.FP_imgs=new Array();
 for(var i=0; i<a.length; i++) { d.FP_imgs[i]=new Image; d.FP_imgs[i].src=a[i]; }
}

function FP_swapImg() {//v1.0
 var doc=document,args=arguments,elm,n; doc.$imgSwaps=new Array(); for(n=2; n<args.length;
 n+=2) { elm=FP_getObjectByID(args[n]); if(elm) { doc.$imgSwaps[doc.$imgSwaps.length]=elm;
 elm.$src=elm.src; elm.src=args[n+1]; } }
}

function FP_getObjectByID(id,o) {//v1.0
 var c,el,els,f,m,n; if(!o)o=document; if(o.getElementById) el=o.getElementById(id);
 else if(o.layers) c=o.layers; else if(o.all) el=o.all[id]; if(el) return el;
 if(o.id==id || o.name==id) return o; if(o.childNodes) c=o.childNodes; if(c)
 for(n=0; n<c.length; n++) { el=FP_getObjectByID(id,c[n]); if(el) return el; }
 f=o.forms; if(f) for(n=0; n<f.length; n++) { els=f[n].elements;
 for(m=0; m<els.length; m++){ el=FP_getObjectByID(id,els[n]); if(el) return el; } }
 return null;
}
// -->
</script>
</HEAD>
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 background="images/bg.gif" onload="FP_preloadImgs(/*url*/'images/button3.gif', /*url*/'images/button5.gif', /*url*/'images/button7.gif', /*url*/'images/button9.gif', /*url*/'images/buttonB.gif')">
<center><br>
<TABLE WIDTH=800 BORDER=0 CELLPADDING=0 CELLSPACING=0>
        <TR>
                <TD>
                        <IMG SRC="images/tkm_01.gif" WIDTH=800 HEIGHT=158 ALT=""></TD>
        </TR>
        <TR>
                <TD>
                        <table border="0" width="100%" cellspacing="0" cellpadding="0" background="images/tkm_02.gif" id="table1">
                                <tr>
                                        <td width="12">&nbsp;</td>
                                        <td valign="top">
                                        <table border="0" width="100%" id="table2" cellspacing="0" cellpadding="0">
                                                <tr>
                                                        <td colspan="5"><p align="right">
                                                        <a href="detail_karyawan.php">
                                                        <img border="0" id="img2" src="images/button4.gif" height="20" width="150" alt="Lihat Data Pribadi" onmouseover="FP_swapImg(1,0,/*id*/'img2',/*url*/'images/button5.gif')" onmouseout="FP_swapImg(0,0,/*id*/'img2',/*url*/'images/button4.gif')" fp-style="fp-btn: Metal Rectangle 1; fp-font-color-hover: #FF0000; fp-img-press: 0; fp-transparent: 1; fp-proportional: 0" fp-title="Lihat Data Pribadi"></a>
                                                        <a href="pengajuan.php">
                                                        <img border="0" id="img3" src="images/button6.gif" height="20" width="150" alt="Pengajuan Cuti" onmouseover="FP_swapImg(1,0,/*id*/'img3',/*url*/'images/button7.gif')" onmouseout="FP_swapImg(0,0,/*id*/'img3',/*url*/'images/button6.gif')" fp-style="fp-btn: Metal Rectangle 1; fp-font-color-hover: #FF0000; fp-img-press: 0; fp-transparent: 1; fp-proportional: 0" fp-title="Pengajuan Cuti"></a>
                                                        <a href="persetujuan.php">
                                                        <img border="0" id="img4" src="images/button8.gif" height="20" width="150" alt="Persetujuan Cuti" onmouseover="FP_swapImg(1,0,/*id*/'img4',/*url*/'images/button9.gif')" onmouseout="FP_swapImg(0,0,/*id*/'img4',/*url*/'images/button8.gif')" fp-style="fp-btn: Metal Rectangle 1; fp-font-color-hover: #FF0000; fp-img-press: 0; fp-transparent: 1; fp-proportional: 0" fp-title="Persetujuan Cuti"></a>
                                                        <a href="keluar.php">
                                                        <img border="0" id="img5" src="images/buttonA.gif" height="20" width="150" alt="Keluar" onmouseover="FP_swapImg(1,0,/*id*/'img5',/*url*/'images/buttonB.gif')" onmouseout="FP_swapImg(0,0,/*id*/'img5',/*url*/'images/buttonA.gif')" fp-style="fp-btn: Metal Rectangle 1; fp-font-color-hover: #FF0000; fp-img-press: 0; fp-transparent: 1; fp-proportional: 0" fp-title="Keluar"></a></p></td>
                                                </tr>
                                                <tr>
                                                        <td width="26%">&nbsp;</td>
                                                        <td width="15%">&nbsp;</td>
                                                        <td width="25%">&nbsp;</td>
                                                        <td width="17%">&nbsp;</td>
                                                        <td width="17%">&nbsp;</td>
                                                </tr>
                                                <tr>
                                                        <td width="26%">Data Karyawan Cuti</td>
                                                        <td width="15%">&nbsp;</td>
                                                        <td width="25%">&nbsp;</td>
                                                        <td width="17%">&nbsp;</td>
                                                        <td width="17%">&nbsp;</td>
                                                </tr>
                                                <tr>
                                                        <td width="26%" bgcolor="#6799CF">Nama</td>
                                                        <td width="15%" bgcolor="#6799CF">Mulai Cuti</td>
                                                        <td width="25%" bgcolor="#6799CF">Alamat Cuti</td>
                                                        <td width="17%" bgcolor="#6799CF">Jumlah Cuti</td>
                                                        <td width="17%" bgcolor="#6799CF">Keterangan</td>
                                                </tr>
                                                <?
                                                        include"sambung.php";
                                                        $data4=mysql_query("select * from data_karyawan where nik='$nik'");
                                                        $d4=mysql_fetch_array($data4);
                                                        $data3=mysql_query("select * from data_cuti where nik_atasan='$d4[nik_atasan]' and status<>'3'and aktivasi<>'-'");
                                                        while($d2=mysql_fetch_array($data3)){
                                                        if($d2[status]=="0"){
                                                        $d2[status]="<a href=\"detail_cuti.php?id=$d2[id]&s=new\">Baru</a>";
                                                        }elseif($d2[status]=="1"){
                                                        $d2[status]="Sedang Cuti";
                                                        }else{
                                                        $d2[status]="Ditolak";
                                                        }
                                                        echo"<tr>
                                                        <td width=\"26%\" bgcolor=\"#F5DDB8\" style=\"border-bottom: 1px solid #FFFFFF\">
                                                        $d2[nama]</td>
                                                        <td width=\"15%\" bgcolor=\"#F5DDB8\" style=\"border-bottom: 1px solid #FFFFFF\">
                                                        $d2[mulai]</td>
                                                        <td width=\"25%\" bgcolor=\"#F5DDB8\" style=\"border-bottom: 1px solid #FFFFFF\">
                                                        $d2[alamat]</td>
                                                        <td width=\"17%\" bgcolor=\"#F5DDB8\" style=\"border-bottom: 1px solid #FFFFFF\">
                                                        $d2[lama] hari</td>
                                                        <td width=\"17%\" bgcolor=\"#F5DDB8\" style=\"border-bottom: 1px solid #FFFFFF\">
                                                        <p align=\"center\">$d2[status]</td>
                                                </tr>";
                                                }
                                                ?>
                                        </table>
                                        <p align="right">Untuk Memberikan persetujuan pengajuan cuti
                                        oleh karyawan, <br>
                                        dapat diklik kata <b>Baru</b> pada bagian keterangan <br>
                                        di tiap-tiap karyawan yang mengajukan cuti.</td>
                                        <td width="15">&nbsp;</td>
                                </tr>
                        </table>
                </TD>
        </TR>
        <TR>
                <TD>
                        <IMG SRC="images/tkm_05.gif" WIDTH=800 HEIGHT=45 ALT=""></TD>
        </TR>
</TABLE>
</BODY>
</HTML>